package hc.j2me.item;

import java.util.Date;

import hc.j2me.util.Jcip;
import hc.j2me.util.OutPortTranser;

public class DateField extends javax.microedition.lcdui.DateField implements IPort{

	public DateField() {
		super(Jcip.getInstance().getString(), Jcip.getInstance().getInt(), Jcip.getInstance().getTimezone());
		Jcip.getInstance().init(this);
	}

	public void appendOutPort(OutPortTranser out) {
		Date d = getDate();
		out.out(d);
	}

	public void appendInPort(Jcip jcip) {
		setDate(new Date(Long.parseLong(jcip.getString())));
	}
	
//	public void initIn(Jcip j){
//	}

	String id = null;
	public String getID() {
		return id;
	}

	public void setID(String id) {
		this.id = id;
	}
	
	short ioMode = 0;

	public void setIOMode(short mode) {
		this.ioMode = mode;
	}
	
	public short getIOMode(){
		return ioMode;
	}
}
